


var store = Ext.create('Ext.data.Store', {
    autoLoad: true,
    pageSize: 25,
    remoteSort: true,
    remoteFilter:true,
    sorters: [{property:"id",direction:"DESC"}],
    proxy: {
        type: 'ajax',
        url : '../userlogin/store',
        reader: {
            type: 'json',
            root: 'results',
            totalProperty: 'total'
        }
    }
});

window.centerItem = Ext.create('Ext.tree.Panel', {
    title: '转换管理',
    reserveScrollbar: true,
    useArrows: true,
    rootVisible: false,
    multiSelect: true,
    singleExpand: true,
    width:'100%',
    height:'100%',
    store: {
        type: 'tree',
        //model: 'KitchenSink.model.tree.Task',
        folderSort: true,
        proxy: {
            type: 'ajax',
            url: '../trans/store'
        }
    },
    tbar: [
        {
            text: '运行转换',
            scope: this,
            iconCls:'x-fa fa-play-circle',
            handler: function() {
                ajaxPost('../trans/run',{trans:"home/t33"})
                //ajaxPost('../trans/start',{transName:"t33"})
            }
        }, 
        /*{
            text: '当前状态图',
            scope: this,
            id:'viewButton',
            iconCls:'x-fa fa-info',
            disabled:true,
            handler: function() {
                ajaxPost('trans/run',function(){},"操作成功")
            }
        }
        ,*/
        {
            text: '删除',
            iconCls:'x-fa fa-trash-o',
            disabled:true,
            id:'delButton1',
            scope: this,
            handler: function() {
                delConfirm(del)
            }
        },
        {
            text: '运行日志',
            iconCls:'x-fa fa-history',
            //disabled:true,
            id:'delButton',
            scope: this,
            handler: function() {
                Ext.create('Ext.window.Window', {
                    title: '运行日志',
                    height: 800,
                    width: 1080,
                    layout: 'fit',
                    items: [
                        {
                            xtype:'grid',
                            title:'123',
                            columns:[
                            ]
                        }

                    ]
                }).show();
            }
        }/*, 
        {
            text: '修改',
            scope: this,
            disabled:true,
            iconCls:'x-fa fa-edit',
            id:'editButton',
            handler: function() {
                goModule('user/edit?'+centerItem.getSelection()[0].id)
            }
        }, 
        {
            text: '重置密码',
            disabled:true,
            id:'resetPasswordButton',
            iconCls:'x-fa fa-user-secret',
            scope: this,
            handler: function() {
                actionConfirm(resetPassword,'密码将会被重置为“123456”')
            }
        }*/
    ],
    columns: [{
        xtype: 'treecolumn', 
        text: '目录/转换名',
        dataIndex: 'text',
        flex: 1,
        sortable: false
    }, {
        text: '创建日期',
        dataIndex: 'createdDate',
        xtype: 'datecolumn',   
        format:'Y-m-d H:i',
        flex: 1,
        sortable: false,
        align: 'center'
    },{
        text: '修改日期',
        dataIndex: 'lastModifiedDate',
        xtype: 'datecolumn',   
        format:'Y-m-d H:i',
        flex: 1,
        sortable: false
    }/*, {
        xtype: 'checkcolumn',
        header: 'Done',
        dataIndex: 'done',

        width: 55,
        stopSelection: false,
        menuDisabled: true
    }, {
        xtype: 'actioncolumn',
        text: 'Edit',

        width: 55,
        menuDisabled: true,
        tooltip: 'Edit task',
        align: 'center',
        iconCls: 'tree-grid-edit-task',
        handler: 'onEditRowAction',
        isActionDisabled: 'isRowEditDisabled'
    }*/],

});

